home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-13 | 5.4 KB | 242 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: ODCtr.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * Classes used by this interface
- *
- */
-
-
- #ifndef SOM_ODContainer_xh
- #define SOM_ODContainer_xh
-
- class ODContainer;
-
- #define ODContainer_MajorVersion 1
- #define ODContainer_MinorVersion 0
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_ODRefCntObject_xh
- #include <RefCtObj.xh>
- #endif
-
- #ifndef ODContainer_API
- #define ODContainer_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class ODFrame;
- class ODFacet;
- class ODObject;
- class ODExtension;
- class ODRefCntObject;
- class ODStorageSystem;
- class ODContainer;
- class ODDocument;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define ODContainerCClassData ODContainerClassData
- #define ODContainerNewClass(major,minor) somNewVersionedClassReference(ODContainer,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define ODContainerMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the ODContainer class object, and the methods it introduces. */
- SOMEXTERN struct ODContainerClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken GetStorageSystem;
- somMToken GetID;
- somMToken GetName;
- somMToken SetName;
- somMToken AcquireDocument;
- somMToken reserved1;
- somMToken reserved2;
- somMToken reserved3;
- somMToken reserved4;
- somMToken reserved5;
- } SOMDLINK ODContainerClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(ODContainer_Class_Source) && !defined(SOM_Module_odctr_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list ODContainerClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for ODContainer Method Procedures
- */
- SOMEXTERN {
- typedef ODStorageSystem* (* SOMLINK somTD_ODContainer_GetStorageSystem)(ODContainer *somSelf, Environment *ev);
- typedef ODContainerID (* SOMLINK somTD_ODContainer_GetID)(ODContainer *somSelf, Environment *ev);
- typedef ODContainerName (* SOMLINK somTD_ODContainer_GetName)(ODContainer *somSelf, Environment *ev);
- typedef void (* SOMLINK somTD_ODContainer_SetName)(ODContainer *somSelf, Environment *ev,
- ODContainerName* name);
- typedef ODDocument* (* SOMLINK somTD_ODContainer_AcquireDocument)(ODContainer *somSelf, Environment *ev,
- ODDocumentID id);
- }
-
- #endif /* ODContainer_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODContainer
- */
- class ODContainer : public ODRefCntObject
- {
- public:
-
- // ODContainer::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for ODContainer, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(ODContainer);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(ODContainer);
- #endif
- }
-
- // ODContainer::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: GetStorageSystem */
- ODStorageSystem* GetStorageSystem(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODStorageSystem* __somResult =
- SOM_ResolveD(this,ODContainer,ODContainer,GetStorageSystem)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODContainer,ODContainer,GetStorageSystem)
- (this,ev);
- #endif
- }
-
- /* method: GetID */
- ODContainerID GetID(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODContainerID __somResult =
- SOM_ResolveD(this,ODContainer,ODContainer,GetID)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODContainer,ODContainer,GetID)
- (this,ev);
- #endif
- }
-
- /* method: GetName */
- ODContainerName GetName(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODContainerName __somResult =
- SOM_ResolveD(this,ODContainer,ODContainer,GetName)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODContainer,ODContainer,GetName)
- (this,ev);
- #endif
- }
-
- /* method: SetName */
- void SetName(Environment *ev,
- ODContainerName* name)
- {
- SOM_ResolveD(this,ODContainer,ODContainer,SetName)
- (this,ev,name);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: AcquireDocument */
- ODDocument* AcquireDocument(Environment *ev,
- ODDocumentID id)
- {
- #ifdef SOMCHKEXCEPT
- ODDocument* __somResult =
- SOM_ResolveD(this,ODContainer,ODContainer,AcquireDocument)
- (this,ev,id);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODContainer,ODContainer,AcquireDocument)
- (this,ev,id);
- #endif
- }
-
- }; /* ODContainer */
-
-
-
- #endif /* SOM_ODContainer_xh */
-